home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
bbsutil
/
wmail230.zip
/
WNODE220.ARJ
/
WNODELST.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1992-12-28
|
21KB
|
675 lines
Unit WNodelst;
{$O+;$R-}
{-----------------------------------------------------------------}
{ Window nodelist handler for editors,mailers and mail processors }
{ Copyright 1991,92 by Silvan Calarco (2:334/100.2@fidonet.org) }
{-----------------------------------------------------------------}
{============================================================================}
{ This unit may be used in your programs and is distributed to favour the }
{ diffusion of an unique nodelist format. The nodelist compiler program is }
{ called WNODE.EXE and is availaible either in the packed that contains }
{ this unit and in SDS network. }
{ The structures of W-Nodelist are in file WNSTRUCT.DOC. }
{ }
{ HOW TO USE THIS UNIT: }
{ Using W-Nodelist two sort of shearches can be made: }
{ 1) By Sysop's name with FindFirstSysop and FindNextSysop }
{ 2) By Node number with FindFirstNode and FindNextNode }
{ }
{ Before performing any sort of search, you have to declare a variable }
{ of type FindNodeRec. The filosophy of this method is very similar to }
{ the one used by TP's FindFirst/FindNext procedures, so FindNodeRec has }
{ the same purpose of SearchRec in unit DOS of TP. }
{ Inquire results will be returned in FindNodeRec.BBSRecord, a record }
{ which contains these informations: }
{ }
{ BBSRecord=Record }
{ NodeType:Byte; }
{ Zone,Net,Node,Point:Integer; }
{ BBSName:String[30]; }
{ SysopName:String[30]; }
{ Location:String[30]; }
{ Phone:String[18]; }
{ BaudRate:Word; }
{ Flags:String[30]; }
{ end; }
{ }
{ NODETYPE contains one of the following values: }
{ }
{ ZC=1; REGION=2; HOST=4; HUB=8; PVT=16; INHOLD=32; DOWN=64; BOSS=128 }
{ }
{ Other fields contents are the image of what appears in nodelist. }
{ }
{----------------------------------------------------------------------------}
{ }
{ 1) FindFirstSysop/FindNextSysop }
{ }
{ To look for one or more entries knowing sysop's name call first time: }
{ }
{ Procedure FindFirstSysop(SubStr:String;Var Find:FindNodeRec); }
{ }
{ Where SubStr is the case unsensitive match string for sysop's name. }
{ Note that a name like "John Mc Gregor" is converted in "GREGOR MC JOHN" }
{ for search. This means that match string "MC GREGOR" wouldn't return }
{ the desired entry. }
{ }
{ To continue search use: }
{ }
{ Procedure FindNextSysop(Var Find:FindNodeRec); }
{ }
{ If Find.BBSRecord.SysopName='' it means that there are no more entries. }
{ }
{----------------------------------------------------------------------------}
{ }
{ 2) FindFirstNode/FindNextNode }
{ }
{ To look for one or more entries knowing address call first time: }
{ }
{ Procedure FindFirstNode(Zone,Net,Node,Point:Integer;Var Find:FindNodeRec); }
{ }
{ Where Zone,Net,Node,Point contain the address of the node to look for. }
{ If you want to look for more than one entry, you can assign one of address }
{ fields the value of "ALL" constant. E.g.: }
{ }
{ Zone:=ALL looks for every node in database }
{ Zone:=2; Net:=334; Node:=ALL looks for every node in zone 2, net 334 }
{ }
{ To continue search use: }
{ }
{ Procedure FindNextSysop(Var Find:FindNodeRec); }
{ }
{ If Find.BBSRecord.SysopName='' it means that there are no more entries. }
{ }
{============================================================================}
Interface
Const
{ List of kinds of entries specified in BBSRecord.NodeType }
ZC=1;
REGION=2;
HOST=4;
HUB=8;
PVT=16;
INHOLD=32;
DOWN=64;
BOSS=128;
ALL=-1; { Used to select global nodes with FindFirstNode }
CompileMode:Boolean=False; { Set to TRUE by WNode when compiling }
Type
BBSRec=Record { Record containing nodelist informations }
NodeType:Byte;
Zone,Net,Node,Point:Integer;
BBSName:String[30];
SysopName:String[30];
Location:String[30];
Phone:String[18];
BaudRate:Word;
Flags:String[30];
end;
NodeLocRec=Record { Record of NODELOC.WNL }
NodeType:Byte;
Zone,Net,Node,Point:Integer;
FileNum:Byte;
FilePos:Longint;
end;
SysopRec=Record { Record of SYSLIST.WNL }
Name:String[20];
BBSRecord:Longint;
end;
NodeRec=Record { Record di NodeIdx.WNL }
NodeType:Byte;
Number:Integer;
BBSRecord:Longint;
Match:Array[1..4] of Char;
SysopRecord:Longint;
end;
FindNodeRec=Record { Record usato in FindFirstNode/FindFirstSysop }
BBSRecord:BBSRec;
SZone,SNet,SNode,SPoint:Integer;
SysStr:String[30];
FPos,FPos1:Longint;
end;
Var
NodeLocFile:File of NodeLocRec;
SysopListFile:File of SysopRec;
NodeIdxFile:File of NodeRec;
Nodelist1,NodeList2